package cn.edu.hpu.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.hpu.dao.WebsiteDao;
import cn.edu.hpu.pojo.Website;
@Transactional
public class WebsiteService {

	private WebsiteDao websiteDao;

	public void save(Website website){
		websiteDao.save(website);
		//websiteDao.getSession().close();
	}
	public void update(Website website){
		websiteDao.update(website);
		websiteDao.getSession().close();
	}
	public void delete(String id){
		websiteDao.del(id);
		//websiteDao.getSession().close();
	}
	public List<Website> find(String contactsid){
		return websiteDao.findBy("contactsid", contactsid);
	}
	@Autowired
	public void setWebsiteDao(WebsiteDao websiteDao) {
		this.websiteDao = websiteDao;
	}
	
	
}
